﻿namespace Acl.Modular
{
    internal class ModuleListenerManager
    {
        private readonly IModuleListener[] _items;

        public ModuleListenerManager(IModuleListener[] listeners) => _items = listeners;

        public void OnModuleChanged(ModuleEventArgs e)
        {
            foreach (var item in _items)
            {
                try
                {
                    item.OnModuleChanged(e);
                }
                catch
                {
                    //todo:
                }
            }
        }
    }
}